cmake_minimum_required(VERSION 3.16)

project(qt_coro_test VERSION 1.0 LANGUAGES CXX)
set(CMAKE_INCLUDE_CURRENT_DIR ON)

set(CMAKE_AUTOUIC ON)
set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)

set(CMAKE_CXX_STANDARD 23)
set(CMAKE_CXX_STANDARD_REQUIRED ON)



find_package(QT NAMES Qt6 COMPONENTS Widgets REQUIRED)
find_package(Qt${QT_VERSION_MAJOR} COMPONENTS Widgets REQUIRED)
#FIX QT6 Link BUG in msys2 Qt static
if (QT_FEATURE_static STREQUAL "ON" AND WIN32 AND MINGW)
	set_property(TARGET harfbuzz::harfbuzz PROPERTY
		IMPORTED_IMPLIB ${harfbuzz_DIR}../../../libharfbuzz.dll.a )
endif()


set(PRJ_HEADERS
	dlgct.h
	filedealer.h
	nmcalc.h
)

set(PRJ_SOURCES
	dlgct.cpp
	filedealer.cpp
	main.cpp
)

set(PRJ_RESOURCES
)
# ========================Exe========================

add_executable(qt_coro_test
	${PRJ_HEADERS}
	${PRJ_SOURCES}
	${PRJ_RESOURCES}
	dlgct.ui
)

target_link_libraries(qt_coro_test PRIVATE
	Qt${QT_VERSION_MAJOR}::Widgets
)


